<script setup lang="ts">
import {ref,reactive,shallowRef,shallowReactive,watch} from "vue"

//defineProps函数接收父组件传参
defineProps({
  // num:Number,
  num:{
    type:Number,
    required:true,
    default:0
  },
  arr:Array,
  obj:{
    type:Object,
    default(){
      return {name:"test"}
    }
  }
})
</script>

<template>
  <div>
    <div>我是子组件</div>
    <div>{{ num }}</div>
    <div>{{ arr }}</div>
    <div>{{ obj }}</div>
  </div>
</template>

<style scoped>

</style>
